﻿using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;

namespace LimaLims.Core.Entity.Basic
{
    /// <summary>
    /// 产品信息
    /// </summary>
    [Comment("产品信息表")]
    public class Product : DEntityTenant
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Comment("名称")]
        [Required, MaxLength(20)]
        public string Name { get; set; }

        /// <summary>
        /// 编号
        /// </summary>
        [Comment("编号")]
        public string Code { get; set; }

        /// <summary>
        /// 出厂编号
        /// </summary>
        [Comment("出厂编号")]
        public string FactoryNumbe { get; set; }

        [Comment("产品分类")]
        public long CategoryId { get; set; }

        public ProductCategory Category { get; set; }

        [Comment("产品项目图纸编号")]
        public long? ProjectDrawingId { get; set; }

        public ProjectDrawing ProjectDrawing { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        [Comment("备注")]
        [MaxLength(100)]
        public string Remark { get; set; }
    }
}
